<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../../" />
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		[page:Object3D] &rarr;

		<h1>[name]</h1>

		<p class="desc">
			Creates 6 cameras that render to a [page:WebGLCubeRenderTarget].
		</p>

		<h2>Code Example</h2>

		<code>
			
		// Create cube render target
		const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 128, { generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );

		// Create cube camera
		const cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget );
		scene.add( cubeCamera );

		// Create car
		const chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeRenderTarget.texture } );
		const car = new THREE.Mesh( carGeometry, chromeMaterial );
		scene.add( car );

		// Update the render target cube
		car.visible = false;
		cubeCamera.position.copy( car.position );
		cubeCamera.update( renderer, scene );

		// Render the scene
		car.visible = true;
		renderer.render( scene, camera );
		
		</code>

		<h2>Examples</h2>

		<p>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</p>

		<h2>Constructor</h2>

		<h3>[name]( [param:Number near], [param:Number far], [param:WebGLCubeRenderTarget renderTarget] )</h3>
		<p>
			near -- The near clipping distance. <br />
			far -- The far clipping distance. <br />
			renderTarget -- The destination cube render target.
		</p>

		<p>Constructs a CubeCamera that contains 6 [page:PerspectiveCamera PerspectiveCameras] that render to a [page:WebGLCubeRenderTarget].</p>

		<h2>Properties</h2>
		<p>See the base [page:Object3D] class for common properties.</p>

		<h3>[property:WebGLCubeRenderTarget renderTarget]</h3>
		<p>The destination cube render target.</p>

		<h2>Methods</h2>
		<p>See the base [page:Object3D] class for common methods.</p>

		<h3>[method:undefined update]( [param:WebGLRenderer renderer], [param:Scene scene] )</h3>
		<p>
			renderer -- The current WebGL renderer <br />
			scene -- The current scene
		</p>
		<p>Call this to update the [page:CubeCamera.renderTarget renderTarget].</p>

		<h2>Source</h2>

		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
		</p>
	</body>
</html>
